<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:a4j="http://richfaces.org/a4j"
	xmlns:rich="http://richfaces.org/rich"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:sijyp="http://java.sun.com/jsf/composite/sijyp"
	xmlns:fn="http://java.sun.com/jsp/jstl/functions"
	xmlns:ui="http://java.sun.com/jsf/facelets">
	
	<rich:dataTable 
		keepSaved="true" 
		id="ldTable" 
		var="record_"
		style="width: 100%" 
		value="#{limitacionDominioBienManager.dataModel}"
		rows="10" 
		noDataLabel="${msg['general.registrosNoEncontrados']}">
		
		<ui:include src="/resources/sijyp/jpaColumn.xhtml">
			<ui:param name="bean" value="#{limitacionDominioBienManager}" />
			<ui:param name="propertyTitle"
				value="bienes.tablaCaracteristicas.idBien" />
			<ui:param name="explicitProperty" value="#{record_.bien.idBien}" />
			
			<ui:param name="propertyFilter" value="bien.idBien" />
			<ui:param name="componentRender" value="ldTable" />
			<ui:param name="hideColumn" value="true" />
		</ui:include>
		
		<ui:include src="/resources/sijyp/jpaColumn.xhtml">
			<ui:param name="bean" value="#{limitacionDominioBienManager}" />
			<ui:param name="propertyTitle"
				value="bienes.situacion.limitacionDominio.table.etapaGestion" />
			<ui:param name="explicitProperty"
				value="#{record_.bien.tpEtapaGestion.nombre}" />
			
			<ui:param name="propertyFilter" value="bien.tpEtapaGestion.nombre" />
			<ui:param name="componentRender" value="ldTable" />
			<ui:param name="hideColumn" value="true" />
		</ui:include>
		<ui:include src="/resources/sijyp/jpaColumn.xhtml">
			<ui:param name="bean" value="#{limitacionDominioBienManager}" />
			<ui:param name="propertyTitle"
				value="bienes.situacion.limitacionDominio.table.tipoLimitacion" />
			<ui:param name="explicitProperty"
				value="#{record_.tpLimitaciondominio.nombre}" />
			
			<ui:param name="propertyFilter" value="tpLimitaciondominio.nombre" />
			<ui:param name="componentRender" value="ldTable" />
		</ui:include>
		<ui:include src="/resources/sijyp/jpaColumn.xhtml">
			<ui:param name="bean" value="#{limitacionDominioBienManager}" />
			<ui:param name="propertyTitle"
				value="bienes.situacion.limitacionDominio.table.valorLimitacion" />
			<ui:param name="explicitProperty" value="#{record_.valor}" />
			<ui:param name="propertyFilter" value="" />
			<ui:param name="componentRender" value="ldTable" />
			<ui:param name="currency" value="true" />
			<ui:param name="explicitPropertyCurrencyType"
				value="#{record_.tpMoneda.tpMoneda}" />
		</ui:include>
		<ui:include src="/resources/sijyp/jpaColumn.xhtml">
			<ui:param name="bean" value="#{limitacionDominioBienManager}" />
			<ui:param name="propertyTitle"
				value="bienes.situacion.limitacionDominio.table.tipoDocumento" />
			<ui:param name="explicitProperty"
				value="#{record_.bienDocumento.tpDocumentoBean.nombre}" />
			<ui:param name="propertyFilter"
				value="bienDocumento.tpDocumentoBean.nombre" />
			<ui:param name="componentRender" value="ldTable" />
		</ui:include>
		<ui:include src="/resources/sijyp/jpaColumn.xhtml">
			<ui:param name="bean" value="#{limitacionDominioBienManager}" />
			<ui:param name="propertyTitle"
				value="bienes.situacion.limitacionDominio.table.archivo" />
			<ui:param name="explicitProperty"
				value="#{record_.bienDocumento.nombre}" />
			<ui:param name="propertyFilter" value="bienDocumento.nombre" />
			<ui:param name="componentRender" value="ldTable" />
			<ui:param name="record" value="#{record_.bienDocumento}" />
			<ui:param name="link" value="true" />
		</ui:include>

		<rich:column>
			<f:facet name="header">
				<h:commandLink value="${msg['bienes.tablaCaracteristicas.accion']}">
					<f:ajax execute="@none" />
				</h:commandLink>
			</f:facet>
			<h:panelGrid columns="3"
				columnClasses="icon_space,icon_space,icon_space,icon_space,icon_space">

				<h:commandLink
					action="#{limitacionDominioBienManager.prepareUpdate}"
					rendered="#{!disableTableEditCommands and !bienManager.disableSubtabsEditAction}">
					<h:graphicImage value="/resources/images/icons/ico_pencil.png"
						title="${msg['boton.editar']}" />
					<f:setPropertyActionListener
						target="#{limitacionDominioBienManager.ld}" value="#{record_}" />
					<f:setPropertyActionListener
						target="#{limitacionDominioBienManager.crud}" value="update" />
					<f:ajax execute="@this" render=":formTabs:panelLd :sijypMessages" />
				</h:commandLink>

				<h:graphicImage value="/resources/images/icons/ico_pencil_gray.png"
					title="${msg['boton.editar']}"
					rendered="#{bienManager.disableSubtabsEditAction}" />

				<h:commandLink action="#{limitacionDominioBienManager.prepareRead}">
					<h:graphicImage value="/resources/images/icons/ico_details.png"
						title="${msg['boton.consultar']}" />
					<f:setPropertyActionListener
						target="#{limitacionDominioBienManager.ld}" value="#{record_}" />
					<f:setPropertyActionListener
						target="#{limitacionDominioBienManager.crud}" value="read" />
					<f:ajax execute="@this" render=":formTabs:panelLd :sijypMessages" />
				</h:commandLink>

				<a4j:commandLink value="" execute="@this" render="@none"
					title="${msg['bienes.situacion.limitacionDominio.table.acciones.delete']}"
					rendered="#{!disableTableEditCommands and !bienManager.disableSubtabsDeleteAction}"
					oncomplete="#{rich:component('confirmDeleteLd')}.show()">
					<h:graphicImage value="/resources/images/icons/ico_delete.png"
						title="${msg['boton.eliminar']}" />
					<a4j:param value="#{record_.idBienlimitaciondominio}"
						assignTo="#{limitacionDominioBienManager.ldDelete}" />
				</a4j:commandLink>


				<h:graphicImage
					value="/resources/images/icons/ico_delete_disabled.png"
					title="${msg['boton.eliminar']}"
					rendered="#{bienManager.disableSubtabsDeleteAction}" />
			</h:panelGrid>
		</rich:column>
		
		<f:facet name="footer">
			<rich:dataScroller maxPages="10" fastStep="5" fastControls="hide" stepControls="show" />
		</f:facet>
	</rich:dataTable>
</ui:composition>
